﻿using System;
using System.Collections.Generic;
using System.Data;
using YmtRpc.Domain;
using YmtRpc.Domain.Enum;

namespace Ymt.Repository
{

    public interface IServiceMetadataRepository : IMySQLRepository<ServiceMetadata>
    {
        /// <summary>
        /// 获取RPC客户端配置列表
        /// </summary>
        /// <returns></returns>
        List<ServiceMetadata> GetList(string appId);

        /// <summary>
        /// 获取应用程序列表
        /// </summary>
        /// <returns></returns>
        List<string> GetAppList();

        ServiceMetadata GetServiceMetadata(string appId, string apiName, string httpMethod);

        bool Delete(string appId, string apiName, string httpMethod);

        bool TryInsert(ServiceMetadata entity);

        bool TryUpdate(ServiceMetadata entity);
    }
}
